package com.bit.secretfolder;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;

import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.view.Menu;
import android.view.View;
import android.view.View.OnLongClickListener;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;

public class FullImage extends Activity {
	ArrayList<Bitmap> arr;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.overridePendingTransition(R.drawable.start_enter, R.drawable.start_exit);
		setContentView(R.layout.activity_full_image);
		
		ImageView imageView = (ImageView) findViewById(R.id.imgV);
		
	
		Intent intent = getIntent();
		final String filePath = intent.getStringExtra("id");
		Bitmap bmp = BitmapFactory.decodeFile(filePath);
		imageView.setImageBitmap(bmp);
	
//		String aa = intent.getStringExtra("path");
//		String sdPath = Environment.getExternalStorageDirectory().getAbsolutePath();
//				
//		arr = new ArrayList<Bitmap>();
//		
//		
//		File file = new File(sdPath+aa);
//		
//		if (file.isDirectory()) {
//			File[] files = file.listFiles();
//
//			for (File f : files) {
//
//				arr.add(BitmapFactory.decodeFile( f.getPath()) );
//			}
//		}
//		Uri uri = Uri.parse("http://"+arr.get(position));
//		imageView.setImageURI(uri);
		
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.full_image, menu);
		return true;
	}

}
